<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type='text/javascript' src='/javascripts/prototype.js'></script>
<script type='text/javascript' src='/javascripts/casper/common.js'></script>
<script type="text/javascript" src="/javascripts/scriptaculous.js"></script>
<script type="text/javascript" src="/javascripts/effects.js"></script>
<script type="text/javascript" src="/javascripts/getRealPopup.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dargens Anonymous p2p File Sharing - Any File Type - MP3 - Movie - TV - eBook - Ants P2P 2 / kerjodando - Search, Download, Play - Download Incognito - Free|Fast|Easy</title>
<link href="/stylesheets/style.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#FEFEFE" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="155" border="0" cellpadding="0" cellspacing="0" class="header">
  <tr>
    <td height="150" background="/images/top_bg.jpg"> 
      <div align="center">
        <table width="800" border="0" cellpadding="0" cellspacing="0" class="table2">
          <tr> 
            <td width="606"> 
              <p class="p"><a href=/><img border=0  src="/images/logo.jpg" width="571" height="114" /></a></p></td>
          </tr>
        </table>
      </div></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#F7FAFF">
      <table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F7FAFF">
        <tr> 
          <td width="600" valign="top">
          <font size=+2><table>
<tr><td><a href=/admin/logout>Admin logout</a></td>
<% if @actype!=0 %>
<td>|<a href=/hotfiles/index>All submited files</a></td>
<% else %>
<td>|All submited files</td>
<% end %>
<% if @actype!=1 %>
<td>|<a href=/hotfiles/index?actype=1>Feartured files</a></td>
<% else %>
<td>|Feartured files</td>
<% end %></tr>
		</table></font>
    	</td></tr>
        <tr> 
          <td width="600" valign="top">
          <table border="0" cellspacing="0" cellpadding="0">
<tr><td><b>Top 10 featured files</b></td><td><b>Size</b></td><td><b>Clicked</b></td><td><b>Description</b></td><td><b>Submit at</b></td><td><b>Action</b></td></tr>
<% @hotfiles.each do |f| %>
<tr><td width=230><div id=fname<%=f.id%> style='overflow:hidden;width:230px;' ><%=h f.name %></div></td><td><%=h f.filesize%></td><td><%= f.clicked%></td><td  width=120><div id=fdesc<%=f.id%> style='overflow:hidden;width:230px'><%= f.description%></div></td><td><%= f.create_at.strftime("%Y-%m-%d %H:%M")%></td><td><a href='javascript:featured(<%=f.id%>,<%= f.status==1?1:2 %>)'><%= f.status==1?"hide":"show" %>|</a><a href='javascript:featured(<%=f.id%>,-1)' onclick='javascript:featured(<%=f.id%>,-1);return false;'>delete</a>|<a href="javascript:modify(<%=f.id%>,'<%=h f.name.gsub(/\'/,"\\\\'") %>','<%=h f.filesize.gsub(/\'/,"\\\\'")%>','<%=h f.description.gsub(/\'/,"\\\\'") %>')">modify</a></td></tr>
<%end%>
<tr><td colspan=5>
<% (@page-9 .. @page+9).each do |i| %>
	<% if i>=0 && i<@count %>
	<% if i==@page %>
	&nbsp;<%= (i+1) %>&nbsp;
	<% else%>
	&nbsp;<a href=/hotfiles/index?actype=<%= @actype %>&page=<%= i%>><%= (i+1) %></a> &nbsp;
	<% end%>
	<% end%>
<%
 end
%>
</td></tr>
		</table>
    	</td></tr>
	  </table>
	</td>
</tr>
</table>

<script language=javascript>
function featured(id,add)
{
	if(add==-1 && ! confirm('Do you want to remove this record?'))return false; 
	document.getElementById("featured").value=add;
	document.getElementById("fid").value=id;
	document.getElementById("formsubmit").submit();
}
PopupVariables = [0.5, 0.6, '#000000', true, 200, 200];
function modify(fid,sfilename,filesize,filedesc)
{
	document.getElementById("fid").value=fid;
	document.getElementById("featured").value=-2;

	document.getElementById('subfilename').innerHTML= sfilename;
	document.getElementById('subfilesize').innerHTML= filesize;
	document.getElementById('filedesc').value=filedesc;
	showPop('myDiv', 400, 400);
}
function closesubmit()
{
	//if(!isSubmitting)
		hidePop( 'myDiv' );
}
</script>
<div id="myDiv" style="display:none;width: 500px;height: 150px;position: absolute;background-color:#CEDEFF;border: 1px #003399 solid;">
<br/>
<form id=formsubmit method=post action='/hotfiles/index'>
<input type=hidden name=authenticity_token value='<%=form_authenticity_token%>'></input>
<input type=hidden id=featured name=featured></input>
<input type=hidden id=fid name=fid></input>
<input type=hidden id=actype name=actype value=<%= @actype%>></input>
<input type=hidden id=page name=page value=<%= @page%> ></input>
<table>
<tr><td align =center colspan=2><font size=+1><b>Modfify the feartured file<b></font></td></tr>
<tr><td>File name</td><td><div id=subfilename></div></td></tr>
<tr><td>File size</td><td><div id=subfilesize></div></td></tr>
<tr><td>File description</td><td><input id=filedesc name=filedesc maxlength=250 size=45></input></td></tr>
<tr><td align=center colspan=2><input type=submit value="Submit"></input><span width=30>&nbsp;</div><input type=button onclick="javascript:closesubmit()" value="Cancel"></input></td>
</tr>
</table>
<br/>
</form>
</div>
</body>
</html>